package by.ostrovsky.webhousingsystem.controller.employe;

import java.util.List;

import org.apache.log4j.Logger;

import by.ostrovsky.webhousingsystem.controller.IOperateController;
import by.ostrovsky.webhousingsystem.dao.DAOFactory;
import by.ostrovsky.webhousingsystem.dao.implementation.idao.IOperateDAO;
import by.ostrovsky.webhousingsystem.exception.CommonException;
import by.ostrovsky.webhousingsystem.hibernate.entity.Employee;

public class UpdateEmployeController implements IOperateController<Employee, Boolean>{
	private static Logger logger = Logger.getLogger(UpdateEmployeController.class);
	
	@Override
	public Boolean set(List<Employee> list) {
		DAOFactory factory = DAOFactory.getDAOFactory(DAOFactory.MySQL);
		IOperateDAO<List<Employee>,Boolean> dao = factory.getEmployeDAO();
		
		try{
			return dao.update(list);
		}
		catch(Exception e){
			logger.error(e);
		}
		return null;
	}

	@Override
	public List<Employee> get() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public Boolean delete(List<Employee> list) throws CommonException {
		// TODO Auto-generated method stub
		return null;
	}
}
